Pki.Tunnel2
Runs a command in the Security Level authenticated by the Pki.PfsGenKey, Pki.PfsAuthHostCert, Pki.PfsAuthRdrCert commands sequence. The command is encrypted with the session key calculated by Pki.PfsAuthRdrCert.
After the reader decrypts the received tunnelled command, it checks whether this command is blocked by the Access Condition Mask assigned to the Security Level or by one of the Access Condition Masks of the certificates in the host certificate chain. If this command is blocked by one of these Access Condition Masks, it is not allowed to be executed in the given Security Level and the ErrAccessDenied status code is returned.
Properties
- Command code: 0x0904
- Command timeout: 100 ms
- Possible status codes: General status codes, Pki.ErrTunnel, Pki.ErrCrypto, Pki.ErrSeqctr, Pki.ErrSessionTimeout
Parameters (request frame)
Name | Type/Size | Description |
---|---|---|
SequenceCounter | Integer (32 bits) | A continuous counter that has to be incremented every time Pki.Tunnel2 is executed (no matter if successful), and that is reset to 0 after a successful execution of the Pki.PfsAuthRdrCert command. |
CmdHMAC | Raw data (length 16 Bytes) | An AES 128 CBC-MAC over EncryptedCmd using the session key calculated by Pki.PfsAuthRdrCert and an IV constructed from SequenceCounter. To get the IV, the sequence counter has to be padded by leading 0x00 and the first Byte of the IV has to be set to 0x20. |
Length of EncryptedCmd | Integer (16 bits) |
Length of EncryptedCmd in bytes |
EncryptedCmd | Raw data |
Encrypted command to execute in the authenticated Security Level. Data is encrypted via AES-128 CBC using the session key generated by Pki.PfsAuthRdrCert and an IV constructed from SequenceCounter. To get the IV for encryption, the sequence counter has to be padded by leading 0x00 and the first Byte of the IV has to be set to 0x10. Before encryption, EncryptedCmd is split up into the following fields:
|
Returned values (response frame)
Name | Type/Size | Description |
---|---|---|
RspHMAC | Raw data (length 16 Bytes) | An AES 128 CBC-MAC over EncryptedRsp using the session key calculated by Pki.PfsAuthRdrCert and an IV constructed from SequenceCounter. To get the IV, the sequence counter has to be padded by leading 0x00 and the first Byte of the IV has to be set to 0x80. |
Length of EncryptedRsp | Integer (16 bits) |
Length of EncryptedRsp in bytes |
EncryptedRsp | Raw data |
Encrypted response of the command which was executed in the authenticated Security Level. Data is encrypted via AES-128 CBC using the session key generated by Pki.PfsAuthRdrCert and an IV constructed from SequenceCounter. To get the IV for encryption, the sequence counter has to be padded by leading 0x00 and the first Byte of the IV has to be set to 0x40. Before encryption, EncryptedRsp is split up into the following fields:
|